@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式 - 支持深色/浅色模式 */
body {
  @apply font-sans bg-white dark:bg-gray-900 text-gray-900 dark:text-white transition-colors duration-300;
  -webkit-text-size-adjust: 100%; /* 已有规则 */
  text-size-adjust: 100%; /* 添加标准属性以支持 Chrome 54+、Chrome Android 54+、Edge 79+ */
}

/* 自定义工具类 */
@layer utilities {
  .content-auto {
    content-visibility: auto;
  }
  .backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* 添加 Safari 兼容性前缀 */
  }
  .text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  .text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  .bg-gradient-primary {
    background: linear-gradient(135deg, #6366f1, #818cf8);
  }
}

/* 输入框聚焦动画 */
input:focus,
textarea:focus,
select:focus {
  @apply border-primary ring-2 ring-primary/20 transition-all duration-300;
}

/* 按钮悬停效果 */
button:not(:disabled):hover {
  @apply transform transition-transform duration-300;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  @apply w-2 h-2;
}
::-webkit-scrollbar-track {
  @apply bg-gray-200/10 dark:bg-gray-800/10 rounded-full;
}
::-webkit-scrollbar-thumb {
  @apply bg-primary/30 hover:bg-primary/50 rounded-full transition-colors;
}
textarea:focus,
select:focus {
  @apply border-primary ring-2 ring-primary/20 transition-all duration-300;
}